from flask import Flask, request
from flask_cors import CORS
import QQ_utils as api

app = Flask(__name__)
CORS(app, supports_credentials=True)
@app.route('/api/get_group_list', methods=["GET"])
def getGroupList():
    return api.getGroupList()

CORS(app, supports_credentials=True)
@app.route('/api/send_msg_to_group', methods=['POST'])
def sendMsgToGroup():
    param = request.get_json()
    msg = param['msg']
    id = param['id']
    return api.sendMsgToGroup(msg, id)

    

if __name__ == '__main__':
    app.run(host = "127.0.0.1", port = 5703, debug=True)


